package com.changzhi.common.enums;

import com.baomidou.mybatisplus.core.enums.IEnum;

/**
 * 开关配置类型
 * 
 * @author lxw
 *
 */
public enum GiftBackgroundEnum implements IEnum<Integer> {

	//背景：0=叶子，1=翡翠，2=钻石，3=玲珑

	leaf(0,null, "https://res.xbyy.live/user/dressup/D8Heri-1604915802705.png"),
	Jade(1,null, "https://res.xbyy.live/user/dressup/WeQzGT-1604915827274.png"),
	diamond(2,null, "https://res.xbyy.live/user/dressup/nQMpwe-1604915850781.png"),
	exquisite(3,null, "https://res.xbyy.live/user/dressup/CDJnrT-1604915862541.png"),
	Jade1(4,null, "https://res.xbyy.live/user/dressup/WeQzGT-1604915827274.png");

	private Integer value;
	private Integer giftConfigId;
	private String desc;

	GiftBackgroundEnum(final Integer value,final Integer giftConfigId, final String desc) {
		this.value = value;
		this.desc = desc;
		this.giftConfigId = giftConfigId;
	}

	public void setGiftConfigId(Integer giftConfigId) {
		this.giftConfigId = giftConfigId;
	}

	@Override
	public Integer getValue() {
		return this.value;
	}

	public String getDesc() {
		return this.desc;
	}

	public Integer getGiftConfigId() {
		return giftConfigId;
	}

	public static String getBackground(Integer giftId){
		if(giftId == null){
			return "";
		}
		for (GiftBackgroundEnum anEnum : GiftBackgroundEnum.values()) {
			if(giftId.equals(anEnum.getGiftConfigId())){
				return anEnum.desc;
			}
		}
		return "";
	}

}
